<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>轻博客小站登录</title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <link rel="stylesheet" th:href="@{/css/login.css}">
    <script th:src="@{/layui/layui.js}"></script>
</head>
<body>
<form class="layui-form  layui-anim layui-anim-scaleSpring" th:action="@{/login}" method="post">
    <div class="title">博客登录</div>
    <div class="errorMsg layui-inline" th:if="${param.error}">用户名或密码错误</div>
    <div class="layui-form-item">
        <label class="layui-form-label"><i class="layui-icon layui-icon-username"></i>&nbsp;用户名</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" name="username" autocomplete="true" placeholder="请输入用户名"
                   minlength="1" maxlength="20" required>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"><i class="layui-icon layui-icon-password"></i>&nbsp;密&nbsp;&nbsp;&nbsp;&nbsp;码</label>
        <div class="layui-input-inline">
            <input type="password" class="layui-input" name="password" autocomplete="true" placeholder="请输入密码"
                   minlength="8" maxlength="20" required>
        </div>
    </div>
    <div class="layui-form-item">
        <input type="checkbox" name="remember-me" title="记住我">
    </div>
    <div class="divider"></div>
    <input type="submit" class="layui-btn layui-btn-lg layui-btn-radius" value="登录">
    <a th:href="@{/register}" class="layui-btn layui-btn-normal layui-btn-lg layui-btn-radius">注册</a>
</form>
</body>
</html>